home *** CD-ROM | disk | FTP | other *** search
- Path: red.weeg.uiowa.edu!robinson
- From: The Amorphous Mass <robinson@blue.weeg.uiowa.edu>
- Newsgroups: comp.lang.c
- Subject: Re: HELP! ANSI-C Date Access
- Date: Fri, 22 Mar 1996 18:12:59 -0600
- Organization: University of Iowa, Iowa City, IA, USA
- Distribution: world
- Message-ID: <Pine.A32.3.91.960322181207.49351A-100000@red.weeg.uiowa.edu>
- NNTP-Posting-Host: red.weeg.uiowa.edu
- Mime-Version: 1.0
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- X-Sender: robinson@red.weeg.uiowa.edu
-
- On 22 Mar 1996, David Rolfe wrote:
-
- > Hello.
- > Could someone tell me the ANSI-C method of accessing the
- > system date? I've used _dos_getdate under the Borland C++ compiler
- > in DOS. But I'd like to keep this version of my program ANSI-C
- > compatible. E-Mail preferred, Thanks.
-
- #include <stdio.h>
- #include <time.h>
-
- int main(void)
- {
- time_t t;
- time(&t);
- printf("The system time is %s\n", ctime(&t));
- return 0;
- }
-
- /**James Robinson***********************
- "If a fatal error occurs, the program should not be allowed to continue."
- -- Oracle Pro*C User's Guide *************james-robinson@uiowa.edu**/
-
-
-
-
-